#include "WinState.h"
#include "..\Managers\RenderManager.h"
#include "..\Managers\StateManager.h"
#include "MenuState.h"
#include "..\Define.h"

WinState::WinState(void)
{
}


WinState::~WinState(void)
{
}

void WinState::initialize()
{
	m_time = 0.0f;
	m_text = RenderManager::getSingleton().getRenderEngine()->createText(2, "mm_font", "Gratz, you won.");
	m_text->setPosition(10.0f, VSH_05);
}

void WinState::shutdown()
{
	RenderManager::getSingleton().getRenderEngine()->clearAll();
}

void WinState::handleEvents()
{

}

void WinState::update(const GameTime& p_gameTime)
{
	m_time += p_gameTime.deltaTime();
	if (m_time >= 3.0f)
		StateManager::getSingleton().setState(new MenuState);
}
